Skip to main content

Face Authentication API (v3)

API Description

Objective

The Face Authentication API (v3) verifies a user's identity by matching a user selfie with an image linked to a unique identifier (UID) in the database. It ensures the selfie is captured live and also supports additional quality and fraud checks on the image. You can configure the face-match scores to suit your business needs.

InputOutput
The user selfie and the unique identifier for their facial data stored in your databaseVerification result indicating if the provided selfie matches the stored image for the given unique ID, along with quality checks and liveness detection
note

Face authentication requires access to the user's stored facial data linked to their unique ID.

API URL

https://ind-orion.hyperverge.co/v3/faceAuth

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalDescriptionValid Values
content-typeMandatoryThis parameter defines the media type for the request payload.multipart/form-data
acceptMandatoryThis parameter defines the media type for the response.application/json
appId MandatoryApplication ID shared by HyperVergeN/A. This is a unique value.
appKey MandatoryApplication Key shared by HyperVerge N/A. This is a unique value.

Input

The following table provides the complete information on the parameters used in the request body for the API call.

Parameter Mandatory or OptionalType Description
transactionIdMandatorystringThe unique identifier for tracking a user journey
uidType Mandatory stringThe type of the unique identifier. It can be the transaction ID or any other unique identifier for the enrolment.
It is commonly configured as the "transaction_id".
uid Mandatory stringThe unique identifier for the user's facial record stored in your database and used during enrolment
selfieMandatoryfileThis is the selfie image of the user. The maximum image size is 6 MB.

Additional Quality and Fraud Checks

In addition to its liveness and face match checks, the API can also execute additional checks on the image (also known as the liveness checks).
You can view the complete list of additional checks under the Additional Checks For Liveness page.

note

If you include any quality check parameter in the request, the result is added to the qualityChecks object in the response.

Sample Request

The following code shows a standard curl request for the API.

curl --location --request POST 'https://ind-orion.hyperverge.co/v3/faceAuth' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--form 'uid="<Unique_ID>"' \
--form 'image=@"<path_to_image_file>"' \
--form 'transactionId="<Enter_the_HyperVerge_transactionID>"' \
--form 'uidType="transaction_id"'

Success Response Sample

The following is an example of a successful response for a matching database record.

{
"status": "success",
"statusCode": 200,
"metadata": {
"requestId": "<Request_Identifier>",
"transactionId": "<Transaction_Identifier>"
},
"result": {
"details": {
"liveness": {
"liveFace": {
"value": "yes",
"confidence": "high"
}
},
"faceMatch": {
"matchScore": 99,
"match": "yes"
}
},
"summary": {
"action": "pass",
"details": []
}
}
}

Failure Responses

The following are the sample failure responses for the API. Alternatively, you can find the details of the failure responses listed here.

The following is an example of a failure scenario when the face match check fails.

{
"status": "failure",
"statusCode": 200,
"metadata": {
"requestId": "<Request_Identifier>",
"transactionId": "<Transaction_Identifier>"
},
"result": {
"details": {
"liveness": {
"liveFace": {
"value": "yes",
"confidence": "high"
}
},
"faceMatch": {
"matchScore": 3,
"match": "no"
}
},
"error": "Face match failed",
"summary": {
"action": "fail",
"details": [
{
"code": "E200",
"message": "Face mismatch"
}
]
}
}
}

Error Responses

The following are the sample failure responses for the API. Alternatively, you can find the details of the failure responses listed here.

{
"status": "failure",
"statusCode": 500,
"metadata": {
"requestId": "<Request_Identifier>",
"transactionId": "<Transaction_Identifier>"
},
"result": {
"details": {
"liveness": {
"liveFace": {
"value": "yes",
"confidence": "high"
}
},
"faceMatch": {}
},
"error": "Internal Server Error",
"summary": {
"action": "fail",
"details": [
{
"code": "E205",
"message": "Lender Node Call Failed"
}
]
}
}
}

Failure and Error Response Details

A failure or error response from the API contains a failure status with a relevant status code and error message. The following table lists all error responses.

Status CodeError MessageError Description
200Face mismatchThe face match check failed. The API detected a live face but the face match score was too low
200Face mismatchThe face match score was low, leading to manual review despite detecting a live face
200Liveness failed with high confidenceThe liveness check on the image failed with high confidence
422No face detectedThe API failed to detect a face in the provided image
404No Record FoundThe provided transactionId has no matching record in the database
500Internal Server Error: Lender Node Call FailedPlease contact the HyperVerge team for resolution
500Internal Server Error: Digitize Service ErrorPlease contact the HyperVerge team for resolution
400API call requires imageThe request is missing the required image input
400"uidType" missing required peer "uid"The request is missing the required uid field, which is necessary when uidType is provided
400"uid" missing required peer "uidType"The request is missing the required uidType field, which is necessary when uid is provided
400"transactionId" is requiredThe request is missing the required transactionId field
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: